﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JshRCSWebApi.Infrastructure.Domain.VO
{
    public class ResponseVO
    {
        /// <summary>
        /// API 错误码
        /// </summary>
        //[JsonProperty(Required = Required.AllowNull)]
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]//设置字段属性，解析JSON数据缺省时不报错
        public int? ret_code { get; set; }

        /// <summary>
        /// API 上传时间戳
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string create_on { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string err_msg { get; set; }
    }
    public class ResponseVO<T>
    {
        /// <summary>
        /// API 错误码
        /// </summary>
        //[JsonProperty(Required = Required.AllowNull)]
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]//设置字段属性，解析JSON数据缺省时不报错
        public int? ret_code { get; set; }

        /// <summary>
        /// API 上传时间戳
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string create_on { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string err_msg { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public T data { get; set; }
    }
}
